﻿CREATE TABLE [dbo].[Transaction] (
    [Id]            UNIQUEIDENTIFIER NOT NULL,
    [SourceId]      INT              NOT NULL,
    [DestinationId] INT              NOT NULL,
    [Amount]        DECIMAL (18)     NOT NULL,
    [Currency]      CHAR (3)         NOT NULL,
    CONSTRAINT [PK_Transaction] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Transaction_DstAccount] FOREIGN KEY ([DestinationId]) REFERENCES [dbo].[Account] ([Id]),
    CONSTRAINT [FK_Transaction_SrcAccount] FOREIGN KEY ([SourceId]) REFERENCES [dbo].[Account] ([Id])
);

